package com.naiterui.ehp.bs.patient.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.naiterui.common.repository.core.BaseJpaRepository;
import com.naiterui.ehp.bp.domain.education.EduAnalysis;
import com.naiterui.ehp.bp.domain.education.EduInfo;

/**
 * <pre>
 *
 * </pre>
 *
 * @author fangguanhong
 * @date 2020/4/10 下午4:06
 * @since 1.0.0
 */
@Repository
public interface IApEduAnalysisRepository extends BaseJpaRepository<EduAnalysis, Long> {

    EduAnalysis findFirstByEduIdAndDoctorIdAndMessageId(Long eduId, Long doctorId, String messageId);

    @Query(nativeQuery = true, value = "select * from edu_info where id=?1")
    List<EduInfo> findFirstById(Long eduId);
}
